package com.example.manage_dzensaas.core.enums;

/**
 * 供应商渠道编号-KEY枚举
 */
public enum ChannelNoEnum {
    TEST_1("测试账号","wangzhiqi", "fd55325e71e945688879ff64f9712c78");

    /**
     * 名称
     */
    private final String name;
    /**
     * code
     */
    private final String code;
    /**
     * key
     */
    private final String secretKey;

    ChannelNoEnum(String name, String code, String secretKey) {
        this.name = name;
        this.code = code;
        this.secretKey = secretKey;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public static ChannelNoEnum getByCode(String code) {
        for (ChannelNoEnum channel : values()) {
            if (channel.getCode().equals(code)) {
                return channel;
            }
        }
        return null;
    }
}
